<template>
  <div class='dialog_content'>
    <el-dialog title="批量导入" class="m_dialog" :visible.sync="dialogVisible" append-to-body :before-close="cancel" :close-on-click-modal="false">
      <el-form ref="form" :model="brandData" :rules="brandRules" label-width="120px" size="small">
        <el-form-item label="所属项目:" prop="examMaterialName">
          <el-input v-model="brandData.examMaterialName" />
        </el-form-item>
        <el-form-item label="所属平面图:" prop="remark">
          <el-select type="textarea" :rows="3" placeholder="请选择所属平面图" v-model="brandData.projectPointPicId">
            <el-option v-for="item in ProjectPointPicList" :key="item.projectPointPicId" :label="item.picName" :value="item.projectPointPicId">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="选择文件:" prop="remark">
          <upload-drag @change="fileChange" v-model="brandData.examMaterialFiles"></upload-drag>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel" class="btn_cancel">取 消</el-button>
        <el-button @click="submitForm" type="primary" class="btn_primary">确 认</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import UploadDrag from '@/components/UploadFiles'
export default {
  name: "ExportList",
  props: {
    dialogVisible: {
      type: Boolean,
      default: false
    },
  },
  data() {
    return {
      // 批量上传表单
      brandData: {
        examMaterialFiles: [],
        projectPointPicId: ''
      },
      brandRules: {
        examMaterialFiles: {
          required: true,
          message: "设备分类不能为空",
          trigger: "change",
        },
      },
      // 项目点图片列表
      ProjectPointPicList: []

    };
  },
  computed: {},
  watch: {},
  created() {

  },
  mounted() {

  },
  methods: {
    fileChange(file) {
      this.brandData.examMaterialFiles.push(file)
    },
    // 提交
    submitForm() {

    },
    cancel() {
      this.$emit('cancel');
    }
  },
  components: {
    UploadDrag
  },
}
</script>

<style lang='less' scoped></style>